package com.example.demo2.controller;

import com.example.demo2.model.BookInfo;
import com.example.demo2.server.BookServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/book")
public class BookController {

    @Autowired
    BookServer bookServer ;
    @RequestMapping("/getList")
    public List<BookInfo> getList() {
        List<BookInfo> bookInfos = bookServer.getList();
        return bookInfos;
    }
}
